home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / lib / mntlib44.zoo / mntlib / sozobon / makefile < prev    next >
Encoding:
Makefile  |  1994-03-01  |  5.9 KB  |  177 lines

  1. # Makefile for hacked MiNTlib for Heat-n-Serve/Sozobon C, version 1.33i
  2. # and above.  This makefile works with the make provided with 1.40 and
  3. # up, and less well with the make provided with 1.33i
  4.  
  5. # Where to install libraries.
  6. # LIBDIR = c:\sozobon\lib
  7. LIBDIR = u:\lib
  8.  
  9. # You might want any or all of these; Sozobon's make predefines most of them.
  10. AR = ar
  11. #CP = cp
  12. #RM = rm -f
  13. MAKE = make
  14.  
  15. # A trick to build a v1.40-compatible library with a v2.00 or higher
  16. # compiler -- either uncomment this line or build the target
  17. # "short_names".  This isn't necessary unless you're building an old
  18. # library with a new compiler (and hopefully by the next release it
  19. # won't be necessary at all).
  20. #SHORTNAMES = -8
  21. AFLAGS = $(SHORTNAMES)
  22.  
  23.  
  24. # To build the .cpp files, you'll need my stand-alone preprocessor,
  25. # which should be available where you got this archive.
  26. CPP = cpp
  27. CPPFLAGS = -P -Wno-bad-chars -D__SOZOBON__ -D__MSHORT__
  28.  
  29. # 1.33i's top apparently takes about 30 minutes on doprnt.c; if you don't
  30. # want to wait that long, use the alternate definition of NOOPT. 
  31. # Unfortunately, there is an optimizer bug in 1.40 that bites here; if
  32. # you're using that version, you must use the non-optimizing version.
  33. CFLAGS = -O -D__NO_FLOAT__ -DNDEBUG $(SHORTNAMES)
  34. #NOOPT = -D__NO_FLOAT__ -DNDEBUG $(SHORTNAMES)    # without optimizing
  35. NOOPT = $(CFLAGS)                # with optimizing
  36.  
  37. # If you prefer more "standard" Unix-like names for your library files, use
  38. # the alternate definitions of CRT0 and LIBC -- assuming, of course, that
  39. # you have a cc that recognizes those names!
  40. # CRT0 = crt0.o
  41. # LIBC = libc.a
  42. CRT0 = dstart.o
  43. LIBC = dlibs.a
  44. LIBS = $(CRT0) $(LIBC) libtermcap.a
  45.  
  46. all : $(LIBS)
  47.  
  48. # These are in alphabetical order to make it easy to find one.
  49. OBJECTS = \
  50.     a64l.o abort.o abs.o access.o alarm.o alloca.o alphasor.o \
  51.     atexit.o atoi.o atol.o \
  52.     bcmp.o bcopy.o binmode.o bsearch.o bzero.o \
  53.     calloc.o cfgetisp.o cfgetosp.o cfsetisp.o cfsetosp.o \
  54.     chdir.o chmod.o chown.o clock.o close.o closedir.o console.o \
  55.     crtinit.o ctermid.o ctime.o ctype.o cuserid.o \
  56.     defmode.o difftime.o div.o doprnt.o \
  57.     do_lock.o do_stat.o dup.o dup2.o \
  58.     eprintf.o execl.o execle.o execp.o execv.o execve.o \
  59.     fclose.o fcntl.o fdopen.o fflush.o \
  60.     ffs.o fgetc.o fgetpos.o fgets.o filbuf.o \
  61.     findfile.o flock.o fopen.o fopen_i.o fopenp.o \
  62.     fork.o fprintf.o fputc.o fputs.o \
  63.     fread.o freopen.o frwbin.o fscanf.o fseek.o fsetpos.o \
  64.     fstat.o ftell.o ftw.o fungetc.o \
  65.     fwrite.o \
  66.     getbuf.o getcwd.o getdtabl.o getegid.o geteuid.o getenv.o \
  67.     getgid.o getgroup.o gethostn.o \
  68.     getlogin.o getopt.o getpages.o \
  69.     getpass.o getpid.o getppid.o getpw.o \
  70.     getrusag.o gets.o getuid.o getw.o getwd.o grp.o \
  71.     heapbase.o \
  72.     ic.o ident.o ig.o il.o inistack.o initsig.o inode.o ioctl.o ip.o \
  73.     isatty.o isctty.o iw.o \
  74.     kill.o killpg.o \
  75.     l64a.o labs.o ldiv.o linea.o link.o lmalloc.o localtim.o \
  76.     lockf.o lseek.o lstat.o ltoa.o \
  77.     main.o malloc.o memccpy.o memchr.o memcmp.o memset.o mkdir.o \
  78.     mkfifo.o mknod.o mktemp.o \
  79.     nice.o nlist.o \
  80.     obstack.o open.o opendir.o osbind.o \
  81.     pause.o perror.o pgrp.o pipe.o popen.o printf.o psignal.o putenv.o \
  82.     putpwent.o puts.o \
  83.     qsort.o \
  84.     raise.o rand.o random.o read.o readdir.o \
  85.     realloc.o regexp.o regsup.o \
  86.     rename.o rewind.o rewinddi.o rmdir.o \
  87.     sbrk.o scandir.o scanf.o seekdir.o select.o \
  88.     setbuf.o setegid.o seteuid.o setgid.o setjmp.o setlocal.o \
  89.     setregid.o setreuid.o setrlimi.o setuid.o setvbuf.o sgtty.o \
  90.     sigactio.o sigblock.o siglist.o \
  91.     signal.o sleep.o sozolong.o sozulong.o spawn.o spawnve.o \
  92.     spawnvp.o sprintf.o sscanf.o stat.o statfs.o stksiz.o strcat.o \
  93.     strchr.o strcmp.o strcoll.o strcpy.o strcspn.o strdup.o \
  94.     strerror.o strftime.o stricmp.o strlen.o strlwr.o strncat.o \
  95.     strncmp.o strncpy.o strnicmp.o strpbrk.o strrchr.o strrev.o \
  96.     strspn.o strstr.o strtok.o strtol.o strtoul.o strupr.o symlink.o \
  97.     sync.o sysconf.o system.o sysvar.o \
  98.     tcattr.o tcbreak.o tcdrain.o tcflow.o tcflush.o \
  99.     tcpgrp.o telldir.o textio.o \
  100.     thread.o time.o timeoday.o times.o tmpfile.o tmpnam.o toxxx.o \
  101.     truncate.o ttyname.o \
  102.     uidgid.o uname.o unlink.o unx2dos.o utime.o utmp.o \
  103.     vfork.o vfprintf.o vfscanf.o vprintf.o vscanf.o \
  104.     wait.o wait3.o waitpid.o wcmb.o wcscat.o \
  105.     wcscmp.o wcscpy.o wcslen.o \
  106.     wnull.o write.o wtmp.o
  107.  
  108. # Rule to handle .cpp files
  109. .SUFFIXES: .cpp
  110.  
  111. .cpp.s:
  112.     $(CPP) $(CPPFLAGS) $< $*.i
  113.     mit2mot $*.i
  114.     $(RM) $*.i
  115.  
  116. .cpp.o:
  117.     $(CPP) $(CPPFLAGS) $< $*.i
  118.     mit2mot $*.i
  119.     $(RM) $*.i
  120.     $(AS) $(AFLAGS) $*.s
  121.  
  122. # Make sure the targets get built if necessary
  123. alloca.o: alloca.cpp
  124. bcopy.o: bcopy.cpp
  125. crt0.o: crt0.cpp
  126. osbind.o: osbind.cpp
  127. setjmp.o: setjmp.cpp
  128. vfork.o: vfork.cpp
  129.  
  130. # bzero.cpp contains both bzero() and memset().
  131. bzero.o: bzero.cpp
  132.     $(CPP) $(CPPFLAGS) -DLbzero bzero.cpp bzero.i
  133.     mit2mot bzero.i
  134.     $(RM) bzero.i
  135.     $(AS) $(AFLAGS) bzero.s
  136.  
  137. memset.o: bzero.cpp
  138.     $(CPP) $(CPPFLAGS) -DLmemset bzero.cpp memset.i
  139.     mit2mot memset.i
  140.     $(RM) memset.i
  141.     $(AS) $(AFLAGS) memset.s
  142.  
  143. # If you're using 1.33i's make or ar, this command will fail spectacularly
  144. # for the first build; you'll have to build it by hand, a few files
  145. # at a time.  After that, if you only change a few files at a time,
  146. # you shouldn't have problems.  Later versions are compiled with ARGV
  147. # and have no problems.
  148. $(LIBC) : $(OBJECTS)
  149.     $(AR) rv $@ $?
  150.  
  151. doprnt.o: doprnt.c
  152.     $(CC) $(NOOPT) -c $?
  153.  
  154. libtermcap.a : termcap.o
  155.     $(AR) rv $@ $?
  156.  
  157. # this is ugly, but I can't think of a way around it without risking the TOS
  158. # "copy file to itself" bug.  If you have CRT0 = crt0.o, this rule will
  159. # never be used anyway.
  160. dstart.o : crt0.o
  161.     $(CP) $? $@
  162.  
  163. # The trick described above -- force v2.00+ compilers to generate short
  164. # identifiers compatible with v1.40 and before.
  165. short_names:
  166.     $(MAKE) SHORTNAMES=-8
  167. clean :
  168.     $(RM) *.o
  169.  
  170. realclean : clean
  171.     $(RM) $(LIBS)
  172.  
  173. install : $(LIBS)
  174.     $(CP) $(LIBC) $(LIBDIR)
  175.     $(CP) $(CRT0) $(LIBDIR)
  176.     $(CP) libtermcap.a $(LIBDIR)
  177.